package com.test.junit;

import java.util.List;
import net.sf.oval.ConstraintViolation;
import net.sf.oval.Validator;
import net.sf.oval.constraint.Length;
import net.sf.oval.constraint.Min;
/**
 * 
 * @author YYR
 * 验证框架oval.jar
 */
public class Oval {

		@Min(value=20,message="结果")
	    private int age;
	    @Length(min = 6, max = 10,message="姓名不再6-10之间")
	    private String name;
	    
	    public static void main(String[] args) {
	        Oval ovalTest = new Oval();
	        ovalTest.age = 10;
	        ovalTest.name = "kolor";
	        
	        Validator validator = new Validator(); 
	        
	        List<ConstraintViolation> ret = validator.validate(ovalTest);
	        
	        System.out.println(ret);
	    }
	
}
